﻿using System;
using System.Collections.Generic;
using System.Web;
using Portal.Modules.FileBrowser;
using System.ComponentModel;
using System.Collections;

/// <summary>
/// Summary description for FileDataBusinessObj
/// </summary>
[DataObject]
public class FileDataBusinessObj
{
  [DataObjectMethod(DataObjectMethodType.Select, true)]
  public static IEnumerable GetDirectoryData(ConfigAgent configAgent)
  {
    if (configAgent.CurrentDirectory != null)
      return configAgent.CurrentDirectory.SubDirectories;
    else
      return null;
  }
  
  [DataObjectMethod(DataObjectMethodType.Select, true)]
  public static IEnumerable GetFilesData(ConfigAgent configAgent)
  {
    if (configAgent.CurrentDirectory != null)
      return configAgent.CurrentDirectory.Files;
    else
      return null;
  }
}
